import request from "@/utils/getMock"

//获取地区数据
export function getLocation() {
    return new Promise((resolve, reject) => {
        request({
            method: "get",
            url: "/location"
        }).then((val) => {
            resolve(val)
        }).catch(err => {
            reject(err.message)
        })
    })
}
// 获取职位数据
export function getPosition(){
    return new Promise((resolve,reject)=>{
        request({
            method:"get",
            url:"/seraching"
        }).then(val=>{
            resolve(val)
        }).catch(err=>{
            reject(err.message)
        })
    })
}
//获取boss前端首页数据
export function getBossHomeData(){
    return new Promise((resolve,reject)=>{
        request({
            method:'get',
            url:"/bossHomeData"
        }).then(val=>{
            resolve(val)
        }).catch(err=>{
            reject(err.message)
        })
    })
}


//获取ad数据
export function getAdData(){
    return new Promise((resolve,reject)=>{
        request({
            method:'get',
            url:"/ad"
        }).then(val=>{
            resolve(val)
        }).catch(err=>{
            reject(err.message)
        })
    })
}

// 获取recruit数据
export function getRecruitData(){
    return new Promise((resolve,reject)=>{
        request({
            method:'get',
            url:"/recruit"
        }).then(val=>{
            resolve(val)
        }).catch(err=>{
            reject(err.message)
        })
    })
}

// 获取web数据
export function getWebData(){
    return new Promise((resolve,reject)=>{
        request({
            method:'get',
            url:"/web"
        }).then(val=>{
            resolve(val)
        }).catch(err=>{
            reject(err.message)
        })
    })
}

// 获取workCityHot数据
export function getWorkCityHot(){
    return new Promise((resolve,reject)=>{
        request({
            method:'get',
            url:"/workCityHot"
        }).then(val=>{
            resolve(val)
        }).catch(err=>{
            reject(err.message)
        })
    })
}

// 获取messageLists数据
export function getMessageLists(){
    return new Promise((resolve,reject)=>{
        request({
            method:'get',
            url:"/messageLists"
        }).then(val=>{
            resolve(val)
        }).catch(err=>{
            reject(err.message)
        })
    })
}

// 获取person数据
export function getPerson(){
    return new Promise((resolve,reject)=>{
        request({
            method:'get',
            url:"/person"
        }).then(val=>{
            resolve(val)
        }).catch(err=>{
            reject(err.message)
        })
    })
}

// 获取resume数据
export function getResume(){
    return new Promise((resolve,reject)=>{
        request({
            method:'get',
            url:"/resume"
        }).then(val=>{
            resolve(val)
        }).catch(err=>{
            reject(err.message)
        })
    })
}

// 获取questionData数据
export function getQuestionsData(){
    return new Promise((resolve,reject)=>{
        request({
            method:'get',
            url:"/questionsData"
        }).then(val=>{
            resolve(val)
        }).catch(err=>{
            reject(err.message)
        })
    })
}
// 获取jobDetail数据
export function getJobDetail(){
    return new Promise((resolve,reject)=>{
        request({
            method:'get',
            url:"/jobDetail"
        }).then(val=>{
            resolve(val)
        }).catch(err=>{
            reject(err.message)
        })
    })
}

// 获取jobInfo数据
export function getJobInfo(){
    return new Promise((resolve,reject)=>{
        request({
            method:'get',
            url:"/jobInfo"
        }).then(val=>{
            resolve(val)
        }).catch(err=>{
            reject(err.message)
        })
    })
}